package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *  机构
 * </p>
 */
@Data
@EntityClassAnnotation(remark = "机构表")
@TableName("sys_office")
@Accessors(chain = true)
public class Office extends SimpleDataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = " 父级机构ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String parentId;
    @TableField(exist = false)
    private String parentName;
    @EntityFieldAnnotation(
            text = " 类型",
            length = "",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Integer type;
    @EntityFieldAnnotation(
            text = "系统编码",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String systemCode;


    @EntityFieldAnnotation(
            text = "机构名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String name;
    @EntityFieldAnnotation(
            text = "机构简称",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String shortname;
    @EntityFieldAnnotation(
            text = "拼音",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String spelling;
    @EntityFieldAnnotation(
            text = "负责人",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String manager;
    @EntityFieldAnnotation(
            text = "联系方式",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String contact;
    @EntityFieldAnnotation(
            text = "电子邮件",
            length = "80",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String email;
    @EntityFieldAnnotation(
            text = "his编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String innerCode;
    @EntityFieldAnnotation(
            text = "hisId",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String innerId;

    // 上级部门编码
    @TableField(exist = false)
    private String parentInnerCode;

    @EntityFieldAnnotation(
            text = "hrp编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hrpCode;

    @EntityFieldAnnotation(
            text = " 备注",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;
}
